<?php session_start();
include "constants.php";
$inmail=INEMAIL;

$_SESSION['Email']=$_POST['Cemail'];

if(!isset($_SESSION['Email'])||empty($_SESSION['Email']))
{echo "Sorry,wrong page";
include "contact.php";
exit();
}


$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); 

if (!$link) { 
    die('Could not connect: ' . mysql_error()); 
} 
mysql_select_db(DB_NAME);

$sql = "SELECT * FROM HOURS";
$result = mysql_query($sql,$link);  	
$row = mysql_fetch_array($result);
$START=$row['START'];
$CLOSE=$row['CLOSE'];

$sql = "SELECT * FROM HOLIDAYS WHERE Datediff(NOW( ) , STR_TO_DATE(DATES , '%m/%d/%Y' ) )=0";
$result = mysql_query($sql,$link);  	
$row = mysql_fetch_array($result);
$NAMES=$row['NAMES'];
$DATES=$row['DATES'];
$HOLIDAYS=mysql_num_rows($result);


//To get email address
if ((isset($_POST['Cemail'])) && (strlen(trim($_POST['Cemail'])) > 0)) {
	$EmailAddress = stripslashes(strip_tags($_POST['Cemail']));
} else {$EmailAddress = '';}
//To get first name
if ((isset($_POST['Cfirstname'])) && (strlen(trim($_POST['Cfirstname'])) > 0)) {
	$FirstName = stripslashes(strip_tags($_POST['Cfirstname']));
} else {$FirstName = '';}

//email validation function
function spamcheck($field)
  {
  //filter_var() sanitizes the e-mail
  //address using FILTER_SANITIZE_EMAIL
  $field=filter_var($field, FILTER_SANITIZE_EMAIL);

  //filter_var() validates the e-mail
  //address using FILTER_VALIDATE_EMAIL
  if(filter_var($field, FILTER_VALIDATE_EMAIL))
    {
    return TRUE;
    }
  else
    {
    return FALSE;
    }
  }

//email spam check function

//To send out email if session email is set up already
if (isset($EmailAddress))
  {//if "email" is filled out, proceed

  //check if the email address is invalid
  $mailcheck = spamcheck($EmailAddress);
  if ($mailcheck==FALSE)
    {
    echo "Sorry, your email address is not correct, please enter new email address";
	exit();
    }  
  }

if ((isset($_POST['Clastname'])) && (strlen(trim($_POST['Clastname'])) > 0)) {
	$LastName = stripslashes(strip_tags($_POST['Clastname']));
} else {$LastName = '';}
if ((isset($_POST['Cphone'])) && (strlen(trim($_POST['Cphone'])) > 0)) {
	$phones = stripslashes(strip_tags($_POST['Cphone']));
} else {$phones = '';}
if ((isset($_POST['csubject'])) && (strlen(trim($_POST['csubject'])) > 0)) {
	$csubject = stripslashes(strip_tags($_POST['csubject']));
} else {$csubject = '';}
if ((isset($_POST['comments'])) && (strlen(trim($_POST['comments'])) > 0)) {
	$comments = stripslashes(strip_tags($_POST['comments']));
} else {$comments = '';}

//$link = mysql_connect('cash2uca.ipagemysql.com', 'cash2uca', 'actW3740!@#$'); 
//if (!$link) { 
//    die('Could not connect: ' . mysql_error()); 
//} 
//mysql_select_db(cash2uca); 
//$sqlinsert1 = "INSERT INTO Comments (`FirstName`, `LastName`, `EmailAddress`, `PhoneNumber`, `Comments`, `CONTACT`) VALUES('$FirstName','$LastName','$EmailAddress','$phones','$comments','1')";
//
//$resultin1=mysql_query($sqlinsert1);

//send email again
	$email = $EmailAddress;
	$subject = $csubject;
   	$message = "Dear ".$FirstName.
		",\n\nThank you for your contact! Your contact is very important to us.
		\n\nOur Office hours: Monday to Friday(except weekends and holidays) ".$START." ~ ".$CLOSE." 
		\n\nOur office is closed on weekend and national holidays. 
		\n\nWe will get back to you ASAP during our office hours.
		\n\nThank you for coming to www.cash2u.ca!
		\n\nCash2u.ca Team!\n\n";

	$message=wordwrap($message,70);
	$froms="From:".$inmail;
	mail($email, $subject,$message,$froms);


//send email to process
	$pemail = $inmail;
	$psubject = $csubject." and phone #:".$phones;
	$pmessage = $comments."\n\n".$FirstName;
	$pmessage=wordwrap($pmessage,70);
	$pfroms="From:".$EmailAddress;
	mail($pemail, $psubject,$pmessage,$pfroms);


//send email again
//    $cash2uemail = "customerservicessupport@cash2u.ca";
//    $cash2usubject = "Information Request";
//    $cash2umessage = "This is information request, Please process this request ASAP";
//    $cash2umessage=wordwrap($cash2umessage,70);
//    mail($cash2uemail, $cash2usubject,$cash2umessage,"From:customerservicessupport@cash2u.ca");



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Cash2u.ca: Payday loan and Cash advance provider in Canada</title>
<META NAME="Keywords" CONTENT="How it works, payday loans,cash advance, payday loan, pay day loans, payday cash advance, online, unsecured loans, no fax payday loans, payday advance, payday cash loan, payday loans, cash advance, paycheque loans, short term,fast cash, unsecured personal loans, pay day loan, no fax loans, no faxing payday loans, no fax cash advance, faxless payday loans, short term loans, unsecured personal loan, unsecured loan, online loans, quick cash, no fax payday loan, payday cash advance, cash advance, online loan, fast cash loans, signature loan, no fax pay day loans, pay day advance, payday loans no faxing required, payday loan online, no faxing cash advance, payday loans no faxing, canada, money mart, money here, quick cash,check,cashing,easy,tax, bill,payment,currency,card,credit,Easy Cash Advances,Internet Payday loans, Payroll Advance, Payday Loan Services,Online Payday Advances, Online Payday Loan Provider, Pay Day">
<META NAME="Description" CONTENT=Cash2u.ca offers online payday loans and cash advance for Canadians">

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="./css/main_style.css"/>
<link rel="stylesheet" type="text/css" href="./css/index.css"/>
</head>
<body>
<div id="maincontainer">

<div id="headsection">
<div id="headback">
<br/><br/><br/><h1><a style="color:white;" href="apply.php">Cash to you</a></h1><p id="headpara"><a style="color:white;" href="apply.php">Simple Easy Fast - Your payday loan</a></p>
</div>
</div>

<table cellspacing="4" cellpadding="1" border="0" style="margin:5px;height:50px;width:740px;background-color:#084c8d;border:1px solid #e5e5e5;color:white;font-size:110%;font-weight:bold;">
<tr><td width="20"></td>
<td width="90" align="center"><a class="headlink" href="index.html">HOME</a></td>
<td width="90" align="center"><a class="headlink" href="apply.php">APPLY</a></td>
<td width="130" align="center"><a class="headlink" href="member.php"><span class="displace">MEMBERS</span></a></td>
<td width="110" align="center"><a class="headlink" href="career.php"><span class="displace">CAREER</span></a></td>
<td width="90" align="center"><a class="headlink" href="faqs.php"><span class="displace">FAQ's</span></a></td>
<td width="90" align="center"><a class="headlink" href="contact.php"><span class="displace">CONTACT</span></a></td>
<td width="140"></td>
</tr>
</table>

 <div id="TopSectionWrapper" class="PersonalInfo">
		<div id="NewCust" class="NewCust">Contact Us</div>
	<p>Thank you for your contacting from Cash2u.ca. We will do our best to quickly process your questions and keep you informed about the result, which we will send by email and we may also tell you by phone.</p>

	<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
		<tr></tr>
		<tr>
		<td width="210" align="right">Business Days and Hours:</td>
                <td width="410" align="left">Monday to Friday (except holidays) 11:00am to 9:00pm EST</td>
		</tr>
		<tr>
                <td width="210" align="right">Contact Email:</td>
                <td width="410" align="left">customerservicessupport@cash2u.ca</td>
		</tr>
		<tr></tr><tr></tr>
		<tr>
                <td width="210" align="right">Web Contact</td>
                <td width="410" align="left"><a href="contact.php" style="color:blue;">Please click here</a></td>
		</tr>
	</table>
		

</div>

<?php 
header("refresh:10;url=http://www.cash2u.ca");
session_destroy();
?> 

<div id="footer">
<div id="imlinks"><b><strong>Copyright ?011 Cash2u.ca All rights reserved</strong></b></div>
</div>

</div>

</body>
</html>







































































































































































































































